package leetcode;

/**
 * @author zhangjunfei
 * @date 2023/8/29 16:40
 */
// TODO: 2023/8/29 未完成
public class L_5 {
    public String longestPalindrome(String s) {
        int start = 0;
        int end = s.length() - 1;

        while (start != end) {
            if (s.charAt(start) == s.charAt(end - 1)) {
                start++;
                end--;
            }
        }
        return s.substring(start, end);
    }
}
